-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rust plugin rename rust keywords with trail underscore #96
Merged
driftluo
merged 1 commit into
nervosnetwork:master
from
driftluo:rust-plugin-add-keyword-rename-feature
Dec 13, 2024
Merged
feat: rust plugin rename rust keywords with trail underscore #96
driftluo
merged 1 commit into
nervosnetwork:master
from
driftluo:rust-plugin-add-keyword-rename-feature
Dec 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
driftluo
force-pushed
the
rust-plugin-add-keyword-rename-feature
branch
2 times, most recently
from
June 28, 2024 11:56
ed0dd42
to
ed8a5fd
Compare
eval-exec
previously approved these changes
Jun 28, 2024
driftluo
force-pushed
the
rust-plugin-add-keyword-rename-feature
branch
from
June 29, 2024 04:19
ed8a5fd
to
7bae730
Compare
eval-exec
previously approved these changes
Jul 1, 2024
MSRV was bumped because of the introduction of https://doc.rust-lang.org/std/sync/struct.OnceLock.html, this should have been stated in the README |
quake
reviewed
Jul 5, 2024
driftluo
force-pushed
the
rust-plugin-add-keyword-rename-feature
branch
from
July 5, 2024 03:24
7bae730
to
7fc7bc5
Compare
eval-exec
previously approved these changes
Jul 24, 2024
doitian
previously approved these changes
Dec 13, 2024
driftluo
force-pushed
the
rust-plugin-add-keyword-rename-feature
branch
from
December 13, 2024 05:42
7fc7bc5
to
990e97b
Compare
driftluo
force-pushed
the
rust-plugin-add-keyword-rename-feature
branch
from
December 13, 2024 05:46
990e97b
to
1c16835
Compare
doitian
approved these changes
Dec 13, 2024
eval-exec
approved these changes
Dec 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR Fix two bugs on molecule:
It is OK to name a type as a rust keyword; the rust plugin will automatically camelCase the name. However, when the field of a table/struct is named as a rust keyword, the current version does not automatically handle this problem, causing the generated code to fail to compile. This PR will automatically check the field name and add an underscore to the end of the keyword to avoid keyword conflicts.
Just like the
type
above, in the generated code, it will becometype_
(Or prefix it withr#
? I'm not sure)I think the solution to keyword conflicts must be solved in each language's plugins.
This PR will detect this situation and report an error: "the name
structP
is used more than once, It seems that only the capitalization is inconsistent"other change: upgrade serde_yaml/clap/pest deps